package cn.wbnyua.resume.mvc.mapper;

import cn.wbnyua.resume.mvc.domain.MySelf;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface MySelfMapper {

    @Select("select * from myself")
    MySelf find();

    @Select("select * from myself where account = #{account}")
    MySelf findByAccount(String account);

    @Update("UPDATE `myself`.`myself` SET `name` = #{name}, `account` = #{account}," +
            " `password` = #{password}, `sex` = #{sex}, `age` = #{age}, `birthday` = #{birthday}, `email` = #{email} WHERE `id` = #{id}")
    int update(MySelf mySelf);


}
